import request from '@/utils/request';

// 获取所有的数据
export function getCateList (){
    return request.get('/category/categoryInfo?parentId=')
}

// 获取切换的数据
export function getTabChange(categoryId){
    return request.get(`prod/pageProd?categoryId=${categoryId}`)
}

// 跳详情的数据
export function getDetail(prodId){
    return request.get(`/prod/prodInfo?prodId=${prodId}`)
}

// 判断是否收藏
export function isCollect(prodId){
    return request.get(`p/user/collection/isCollection?prodId=${prodId}`)
}

// 收藏
export function getCollect(data){
    return request.post('/p/user/collection/addOrCancel',data)
}